package eerbaar.v2.app.core;

import java.awt.Graphics2D;

import eerbaar.v2.app.images.Images;

public abstract class Entity {

    protected int x;
    protected int y;
    protected ISprite sprite;

    public Entity(String ref, int x, int y) {
        this.sprite = Images.instance().getSprite(ref);
        this.x = x;
        this.y = y;
    }

    public void draw(Graphics2D g) {
        this.sprite.drawSquare(g, this.x, this.y);
    }

    public int getX() {
        return this.x;
    }

    public int getY() {
        return this.y;
    }

}